import React, { Component } from 'react'
//引入中间人文件夹
import {moneyContext} from '../context/index.jsx' 
import Sun from './sun.jsx'
export default class Father extends Component {
    //static类组件的静态属性
    static contextType = moneyContext
    render() {
        return (
            <div>
                <p>我是父级</p>
                <h1>{this.context}</h1>
                <Sun/>
            </div>
        )
    }
}
